package cn.zebra.dev.shop.module.shop.service;

import cn.zebra.dev.ibatis.plus.service.IService;
import cn.zebra.dev.ibatis.plus.utils.PageUtils;
import cn.zebra.dev.shop.module.shop.entity.ShopEntity;

import java.util.Collection;
import java.util.List;
import java.util.Map;

public interface ShopService extends IService<ShopEntity> {

    ShopEntity addShop(ShopEntity entity);

    PageUtils<ShopEntity> queryPage(Integer pageNo, Integer pageSize, String shopName);

    ShopEntity findShopByAdminId(Long userId);

    /**
     * 根据主键id集合查找店铺对象集合
     *
     * @param shopIds 店铺id集合
     * @return 店铺对象集合
     */
    List<ShopEntity> findByIds(Collection<Long> shopIds);

    /**
     * 根据主键id查找店铺对象
     *
     * @param shopId 店铺id
     * @return 店铺对象
     */
    @Override
    ShopEntity findById(Long shopId);

    /**
     * 查询所有店铺信息
     * @param params
     * @return
     */
    PageUtils<ShopEntity> findPage(Map<String, Object> params);

    /**
     * 根据店铺id查询商品列表信息
     */
    List<ShopEntity> findByIds(List<Long> shopIds);
}
